<template>
  <div>
    <h3>组件B中设置的 props {{ age }}</h3>
    <p>组件B中设置的 $attrs {{ $attrs }}</p>
    <p>组件B中设置的 $listeners {{ $listeners }}</p>
    <hr />
    <component-c v-bind="$attrs" v-on="$listeners"></component-c>
  </div>
</template>
<script>
import ComponentC from './ComponentC'
export default {
  components: { ComponentC },
  inheritAttrs: false,
  props: {
    age: {
      type: Number,
      default: 30
    }
  },
  mounted () {
    this.$emit('test1-component-b')
    console.log('componentB', this.$attrs, this.$listeners)
  }
}
</script>
